package com.jianyun.jyzs.model.imdoel;

import com.jianyun.jyzs.dao.EngProjectDao;
import com.jianyun.jyzs.dao.EngineerDao;

import java.util.HashMap;

/**
 * 工程动态
 * Created by yangshijun on 2018/5/30.
 */

public interface IEngineerModel  {

    /**
     * 获取工程动态
     * @param dao
     * @param userid
     * @param enterpriseCode
     * @param onGetEngineerListener
     */
    void getEngineer(EngineerDao dao, String userid, String enterpriseCode, String upOrDown, OnGetEngineerListener onGetEngineerListener);


    /**
     * 获取工程动态
     * @param dao
     * @param userid
     * @param enterpriseCode
     * @param onGetEngineerListener
     */
    void getRefreshEngineer(EngineerDao dao, String userid, String enterpriseCode, String upOrDown,OnRefeshListener onRefeshListener);


    /**
     * 刷新数据
     * @param dao
     * @param userid
     * @param enterpriseCode
     * @param direction
     * @param onRefeshListener
     */
    void refeshList(EngineerDao dao, String userid, String enterpriseCode, String direction,String compareId,String proJectId,String placeName,OnRefeshListener onRefeshListener);

    /**
     * 如果本地数据库没有相关项目数据 从这里请求保存
     * @param dao
     * @param map
     * @param onP1DataListener
     */
    void getP1Data(EngProjectDao dao, HashMap<String, String> map, OnP1DataListener onP1DataListener);

    interface OnGetEngineerListener{
        void onSuccess();
        void onFailed(String msg);
    }

    interface OnRefeshListener{
        void onSuccess();
        void onFailed(String msg);
    }

    interface OnP1DataListener{
        void onP1Success();
        void onP1Failed(String msg);
    }
}
